#ifndef _GORBATRAS_FBXDATA
#define _GORBATRAS_FBXDATA

#include "Gorbatras_Library.h"

namespace GC
{
	class FbxSkeleton;
	class FbxMesh;
	class FbxAnimation;	

	class FbxData
	{
		public:	
			FbxData(FbxNode* a_rootNode, FbxScene* a_scene);
			~FbxData();			
			//Sets up the Meshes, Bones & skeletons
			const bool HandleNodes(FbxNode* a_node, const FbxNode* a_rootNode, FbxManager* a_manager);
			//Set up the FbxAnimation data classes!
			const bool HandleAnimations(const FbxScene* a_scene, FbxNode* a_rootNode);
			const bool IsInitialized();

			/* GET FUNCTIONS */
			const double GetFrameRate() const;
			
			const VectorFbxMeshPtr GetMeshes() const;
			const size_t GetMeshesSize() const;

			const VectorFbxSkeletonPtr GetSkeletons() const;
			const size_t GetSkeletonsSize() const;

			const VectorFbxAnimationPtr GetAnimations() const;
			const size_t GetAnimationsSize() const;
		private:	
			VectorFbxMeshPtr m_meshes;
			VectorFbxSkeletonPtr m_skeletons;
			VectorFbxAnimationPtr m_animations;

			double m_frameRate;
			bool m_initialized;
			//Recursively loop through all the nodes, starts at the root
			void InitFbxDataNodes(FbxNode* a_node, int& a_meshCount, int& a_skeletonCount);
			const bool HandleMeshNode(FbxNode* a_meshNode, const FbxNode* a_rootNode, FbxManager* a_manager);
			void HandleSkeletonNode(const FbxNode* a_skeletonNode, const FbxNode* a_rootNode);	
	};
}

#endif